# -*- coding: UTF-8 -*-
# @Author  : icedew
# @File    : config.py
# @Time    : 2019-4-29 17:19
from datetime import timedelta

DEBUG = True

DB_URI = "mysql+pymysql://root:dj1991@127.0.0.1:3306/bbs?charset=utf8"

SQLALCHEMY_DATABASE_URI = DB_URI
SQLALCHEMY_TRACK_MODIFICATIONS =False
import os
#session
SECRET_KEY = os.urandom(24)
#设置session有效期为2天，若开启了session.permanent后不设置该参数，则默认为31天
PERMANENT_SESSION_LIFETIME = timedelta(days=7)
CMS_USER_ID = 'abcdefg'
WTF_CSRF_ENABLED = True

#mail
MAIL_SERVER = 'smtp.aliyun.com'
MAIL_PORT = '465'
MAIL_USE_SSL = True #使用SSL，端口号为465或587
MAIL_USERNAME = 'whatding@aliyun.com'
MAIL_PASSWORD = 'a741719045'   #注意，这里的密码不是邮箱密码，而是授权码
MAIL_DEFAULT_SENDER = 'whatding@aliyun.com'